﻿<Window x:Class="UMLSynthesizer.EAUMLSynthesizerPlugin.View.SelectViewWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converters="clr-namespace:UMLSynthesizer.EAUMLSynthesizerPlugin.View.Converters"
        Title="Select View" Height="139.951" Width="436.634" ResizeMode="NoResize">
    <Window.Resources>
        <converters:BoolInverterConverter x:Key="BoolInverterConverter" />
    </Window.Resources>
    <Grid>
        <RadioButton x:Name="useExistingRadio" Content="Use an existing View" HorizontalAlignment="Left" Margin="10,17,0,0" VerticalAlignment="Top" IsChecked="{Binding CreateNewView, Converter={StaticResource BoolInverterConverter}}"/>
        <ComboBox Margin="156,10,10,0" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, ElementName=useExistingRadio}" ItemsSource="{Binding ExistingModelViewNames}" SelectedItem="{Binding SelectedModelViewName}"/>
        <RadioButton x:Name="createNewRadio" Content="Create a new View" HorizontalAlignment="Left" Margin="10,44,0,0" VerticalAlignment="Top" IsChecked="{Binding CreateNewView}"/>
        <ComboBox Margin="156,37,142,0" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, ElementName=createNewRadio}" ItemsSource="{Binding ExistingModelNames}" SelectedItem="{Binding SelectedModelName}"/>
        <TextBox Margin="294,37,10,0" Text="{Binding SelectedViewName}" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, ElementName=createNewRadio}" Height="22" />
        <Button Content="OK" HorizontalAlignment="Right" Margin="0,63,90,0" VerticalAlignment="Top" Width="75" IsDefault="True" Command="{Binding SelectViewAndCloseCommand}"/>
        <Button Content="Cancel" HorizontalAlignment="Right" Margin="0,63,10,0" VerticalAlignment="Top" Width="75" IsCancel="True" Command="{Binding CloseCommand}" />
    </Grid>
</Window>
